﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Culture="auto" UICulture="auto" Inherits="System.Web.Mvc.ViewPage<Sherwood.SignOn.Server.Models.ViewModels.SignInViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%= Translations.SignIn_Title %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

	  <h2><span class="title-left"><span class="title-right"><span class="icon-lock"></span><%= Translations.SignIn_Title %></span></span></h2>
    <%= Translations.SignIn_Intro_Text.Parameterize(Model) %>
     <% Html.BeginForm(); %>
    <div class="input-title"><%= Translations._Username %></div>
    <div class="input"><%= Html.TextBox("Username", null, new { tabindex = "1", autocomplete = Sherwood.SignOn.Server.Models.Services.Context.IsIPhone ? "off" : "on" })%><%= Html.ValidationMessage("UserName") %></div>
    
    <div class="input-title"><%= Translations._Password %></div><div class="input-title-right"><a href="/UserAccount/ForgotPassword/<%=  Model != null ? "?RequestedUrl=" + HttpUtility.UrlEncode(Model.GetReturnUrlWithoutTicket()) : "" %>"><%= Translations.SignIn_Forgot_Password_Link %></a></div>
    <div class="input"><%= Html.Password("Password", null, new { tabindex = "2", autocomplete = Sherwood.SignOn.Server.Models.Services.Context.IsIPhone ? "off" : "on" })%><%= Html.ValidationMessage("Password") %></div>
    
    <div class="input-title rememberMe"  title="<%= Translations.SignIn_RememberMe_Tooltip %>"><%= Html.CheckBox("RememberMe")%> <%= Translations.SignIn_RememberMe %> </div>
    <div class="submit"> <input tabindex="3" type="submit" value="<%= Translations.SignIn_LoginButton %>" /></div>
    
    <%= HttpUtility.HtmlDecode(Html.ValidationMessage("") != null ? "<br />" + Html.ValidationMessage("").ToHtmlString() : "") %><br /> <br /><br />
    
    <a class="link-button" href="/UserAccount/Register/<%=  Model != null ? "?RequestedUrl=" + HttpUtility.UrlEncode(Model.GetReturnUrlWithoutTicket()) : "" %>"><%= Translations.SignIn_Create_New_Account_Link %></a>
    
    <a class="link-support" href="/Support/" title="<%: Translations.SignIn_SupportLink %>"><img src="/Content/Help-32.png" alt="<%: Translations.SignIn_SupportLink %>" /><span><%: Translations.SignIn_SupportLink %></span></a>
    

    <%= Translations.SignIn_Foot_Note %>

<script type="text/javascript">
	if(document.getElementById('Username')){
		document.getElementById('Username').focus();
    }
    $('.rememberMe[title]').tooltip({ predelay: 100, opacity: 0.9 });
</script>
    <% Html.EndForm(); %>
</asp:Content>
